﻿using System;

class ReverseDigits
{
    static void Main()
    {
        decimal number = 253.6587M;
        decimal result = ReverseNumber(number);

        Console.WriteLine("The reversed number is {0}", result);
    }

    private static decimal ReverseNumber(decimal number)
    {
        string result = "";

        for (int i = number.ToString().Length - 1; i >= 0; i--)
        {
            result += number.ToString()[i];
        }

        return decimal.Parse(result);
    }
}